package cn.fzkj.future06;

import akka.actor.AbstractActor;
import akka.event.Logging;
import akka.event.LoggingAdapter;

/**
 * @ author mr
 * @ description
 * @ since 2024/12/2
 */
public class PrintActor extends AbstractActor {

    private final LoggingAdapter log = Logging.getLogger(getContext().system(), this);


    @Override
    public Receive createReceive() {
        return receiveBuilder()
                .match(Integer.class, msg -> {
                    log.info("print: " + msg);
                })
                .matchAny(this::unhandled)
                .build();
    }
}
